#region Summary

// 
// Owner : JackieHan 
// 
// Solution : UpdateSystem
// 
// Project :Skomart.Update.ServiceContracts
// 
// File : IPuslish.cs
// 
// CopyRight : Copyright © 2010-2011 Skomart Corporation, All Rights Reserved 
// 
// Summary : 发布相关操作
// 
// History : 
//			2011-01-06 15:01:44	    Create 
// 

#endregion

#region Using

using System;
using System.Collections.Generic;
using System.ServiceModel;
using Jackie.Update.Entities;
using Jackie.Update.Entities.Server;

#endregion

namespace Jackie.Update.IBusiness
{
    /// <summary> 
    /// 发布相关操作
    /// </summary>
    [ServiceContract]
    public interface IPublish
    {
        /// <summary>
        /// 获取当前的最新文件
        /// </summary>
        /// <param name="systemName">系统名称</param>
        /// <returns></returns>
        [OperationContract]
        List<UpdateFileInfo> GetNewFiles(string systemName);

        /// <summary>
        /// 检查版本号,已经存在false(没有通过验证),不存在true(通过验证)
        /// </summary>
        /// <param name="systemName">系统名称</param>
        /// <param name="systemVersion">系统版本号</param>
        /// <returns></returns>
        [OperationContract(Action = "GET")]
        bool CheckSystemVersion(string systemName, string systemVersion);

        /// <summary>
        /// 根据更新记录更新配置文件
        /// </summary>
        /// <param name="systemName">系统名称</param>
        /// <param name="publishLog">当前更新记录</param>
        [OperationContract]
        void UpdateConfig(string systemName, PublishLogInfo publishLog);

        /// <summary>
        /// 获取系统发布的服务器端路径
        /// </summary>
        /// <param name="systemName">系统名称</param>
        /// <returns></returns>
        [OperationContract]
        string GetPublishDirectory(string systemName);
    }
}